/**
 * 
 */
package soa.security.ws;

import javax.jws.WebParam;
import javax.jws.WebService;

import soa.security.exception.OrganizationException;

/**
 * @author CreGu
 *
 */
@WebService
public interface DepartmentService {
	/**
	 * 部门信息新增
	 * 
	 * @param organizationId
	 * @param department
	 * @return
	 * @throws OrganizationException
	 */
	public boolean addDepartment(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "department") String department)
			throws OrganizationException;

	/**
	 * 部门信息修改
	 * 
	 * @param organizationId
	 * @param department
	 * @return
	 * @throws OrganizationException
	 */
	public boolean updateDepartment(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "department") String department)
			throws OrganizationException;

	/**
	 * 部门信息修改 获取机构内的所有部门信息
	 * 
	 * @param organizationId
	 * @return
	 * @throws OrganizationException
	 */
	public String allDepartments(
			@WebParam(name = "organizationId") String organizationId)
			throws OrganizationException;

	/**
	 * 获取指定部门信息
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @return
	 * @throws OrganizationException
	 */
	public String getDepartment(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId)
			throws OrganizationException;

	/**
	 * 以下为关系服务
	 */

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param personIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean addPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param personIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean removePersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "personIds") String personIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @return
	 * @throws OrganizationException
	 *             String
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public String allPersons(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param positionIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean addPositions(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "positionIds") String positionIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param positionIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean removePositions(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "positionIds") String positionIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public String allPositions(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param groupIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean addGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "groupIds") String groupIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param groupIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean removeGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "groupIds") String groupIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public String allGroups(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param roleIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean addRoles(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "roleIds") String roleIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @param roleIds
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public boolean removeRoles(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId,
			@WebParam(name = "roleIds") String roleIds)
			throws OrganizationException;

	/**
	 * 
	 * @param organizationId
	 * @param departmentId
	 * @return
	 * @throws OrganizationException
	 *             boolean
	 * 
	 * @author Cre.Gu at 2015年4月9日
	 */
	public String allRoles(
			@WebParam(name = "organizationId") String organizationId,
			@WebParam(name = "departmentId") String departmentId)
			throws OrganizationException;
}
